package demo.DataStrucAndAlgo.Easy_pritice;

import java.util.Scanner;

/**
 * @Auther: hjy(lc))
 * @Date: 2022/10/15-10-15-19:34
 * @Description：demo.DataStrucAndAlgo.Easy_pritice
 */
public class JingDongTest2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        int len = str.length();
        for (int i = 0; i < str.length(); i++) {
            for(int j = i + 1; j < str.length(); j++){
                if(Math.abs(str.charAt(i)-str.charAt(j)) == 1){
                    break;
                }
            }
        }
        System.out.println(len);
    }
}
